﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace System.Web.Mvc.Html
{
    public static class HtmlExtensions
    {
        public static IHtmlString Json(this HtmlHelper htmlHelper, object model)
        {
            return htmlHelper.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(model
                , new Newtonsoft.Json.Converters.JavaScriptDateTimeConverter()));
        }
    }
}